#pragma once

#include "Headers.h"

namespace CinePerfil 
{
	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;

	public ref class Search_Window : public System::Windows::Forms::Form
	{
	public:
		Search_Window(DataBase *d)
		{
			this->database = d;
			InitializeComponent();
		}

	protected:
		~Search_Window()
		{
			if (components)
			{
				delete components;
			}
		}
	private: DataBase *database;
	private: System::Windows::Forms::Label^  SW_errorLabel;
	private: System::Windows::Forms::Button^  SW_okButton;
	private: System::Windows::Forms::Button^  SW_backButton;
	private: System::Windows::Forms::Label^  SW_titleSearchLabel;
	private: System::Windows::Forms::TextBox^  SW_titleTextBox;
	private: System::Windows::Forms::Label^  SW_genreSearchLabel;
	private: System::Windows::Forms::TextBox^  SW_genreTextBox;
	private: System::Windows::Forms::Label^  SW_nameSearchLabel;
	private: System::Windows::Forms::TextBox^  SW_nameTextBox;
	private: System::Windows::Forms::Label^  SW_dateSearchLabel;
	private: System::Windows::Forms::Label^  SW_date1Label;
	private: System::Windows::Forms::TextBox^  SW_date1dayTextBox;
	private: System::Windows::Forms::TextBox^  SW_date1monthTextBox;
	private: System::Windows::Forms::TextBox^  SW_date1yearTextBox;
	private: System::Windows::Forms::Label^  SW_date2Label;
	private: System::Windows::Forms::TextBox^  SW_date2dayTextBox;
	private: System::Windows::Forms::TextBox^  SW_date2monthTextBox;
	private: System::Windows::Forms::TextBox^  SW_date2yearTextBox;
	private: System::Windows::Forms::Panel^  SW_searchPanel;
	private: System::Windows::Forms::Label^  SW_resultsLabel;

	private: System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code

		void InitializeComponent(void)
		{
			System::ComponentModel::ComponentResourceManager^  resources = (gcnew System::ComponentModel::ComponentResourceManager(Search_Window::typeid));
			this->SW_errorLabel = (gcnew System::Windows::Forms::Label());
			this->SW_okButton = (gcnew System::Windows::Forms::Button());
			this->SW_backButton = (gcnew System::Windows::Forms::Button());
			this->SW_titleSearchLabel = (gcnew System::Windows::Forms::Label());
			this->SW_titleTextBox = (gcnew System::Windows::Forms::TextBox());
			this->SW_genreSearchLabel = (gcnew System::Windows::Forms::Label());
			this->SW_genreTextBox = (gcnew System::Windows::Forms::TextBox());
			this->SW_nameSearchLabel = (gcnew System::Windows::Forms::Label());
			this->SW_nameTextBox = (gcnew System::Windows::Forms::TextBox());
			this->SW_dateSearchLabel = (gcnew System::Windows::Forms::Label());
			this->SW_date1Label = (gcnew System::Windows::Forms::Label());
			this->SW_date1dayTextBox = (gcnew System::Windows::Forms::TextBox());
			this->SW_date1monthTextBox = (gcnew System::Windows::Forms::TextBox());
			this->SW_date1yearTextBox = (gcnew System::Windows::Forms::TextBox());
			this->SW_date2Label = (gcnew System::Windows::Forms::Label());
			this->SW_date2dayTextBox = (gcnew System::Windows::Forms::TextBox());
			this->SW_date2monthTextBox = (gcnew System::Windows::Forms::TextBox());
			this->SW_date2yearTextBox = (gcnew System::Windows::Forms::TextBox());
			this->SW_searchPanel = (gcnew System::Windows::Forms::Panel());
			this->SW_resultsLabel = (gcnew System::Windows::Forms::Label());
			this->SW_searchPanel->SuspendLayout();
			this->SuspendLayout();
			// 
			// SW_errorLabel
			// 
			this->SW_errorLabel->BackColor = System::Drawing::Color::Transparent;
			this->SW_errorLabel->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 9, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SW_errorLabel->ForeColor = System::Drawing::Color::Red;
			this->SW_errorLabel->Location = System::Drawing::Point(75, 220);
			this->SW_errorLabel->Name = L"SW_errorLabel";
			this->SW_errorLabel->Size = System::Drawing::Size(500, 13);
			this->SW_errorLabel->TabIndex = 0;
			this->SW_errorLabel->TextAlign = System::Drawing::ContentAlignment::MiddleCenter;
			// 
			// SW_okButton
			// 
			this->SW_okButton->Cursor = System::Windows::Forms::Cursors::Hand;
			this->SW_okButton->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SW_okButton->Location = System::Drawing::Point(122, 250);
			this->SW_okButton->Name = L"SW_okButton";
			this->SW_okButton->Size = System::Drawing::Size(150, 65);
			this->SW_okButton->TabIndex = 1;
			this->SW_okButton->Text = L"Ok";
			this->SW_okButton->UseVisualStyleBackColor = true;
			this->SW_okButton->Click += gcnew System::EventHandler(this, &Search_Window::SW_okButton_Click);
			// 
			// SW_backButton
			// 
			this->SW_backButton->Cursor = System::Windows::Forms::Cursors::Hand;
			this->SW_backButton->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SW_backButton->Location = System::Drawing::Point(362, 250);
			this->SW_backButton->Name = L"SW_backButton";
			this->SW_backButton->Size = System::Drawing::Size(150, 65);
			this->SW_backButton->TabIndex = 2;
			this->SW_backButton->Text = L"Back";
			this->SW_backButton->UseVisualStyleBackColor = true;
			this->SW_backButton->Click += gcnew System::EventHandler(this, &Search_Window::SW_backButton_Click);
			// 
			// SW_titleSearchLabel
			// 
			this->SW_titleSearchLabel->AutoSize = true;
			this->SW_titleSearchLabel->BackColor = System::Drawing::Color::Transparent;
			this->SW_titleSearchLabel->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SW_titleSearchLabel->Location = System::Drawing::Point(50, 40);
			this->SW_titleSearchLabel->Name = L"SW_titleSearchLabel";
			this->SW_titleSearchLabel->Size = System::Drawing::Size(132, 20);
			this->SW_titleSearchLabel->TabIndex = 3;
			this->SW_titleSearchLabel->Text = L"Movie/Serie title:";
			// 
			// SW_titleTextBox
			// 
			this->SW_titleTextBox->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SW_titleTextBox->Location = System::Drawing::Point(190, 37);
			this->SW_titleTextBox->Name = L"SW_titleTextBox";
			this->SW_titleTextBox->Size = System::Drawing::Size(400, 28);
			this->SW_titleTextBox->TabIndex = 4;
			// 
			// SW_genreSearchLabel
			// 
			this->SW_genreSearchLabel->AutoSize = true;
			this->SW_genreSearchLabel->BackColor = System::Drawing::Color::Transparent;
			this->SW_genreSearchLabel->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SW_genreSearchLabel->Location = System::Drawing::Point(128, 85);
			this->SW_genreSearchLabel->Name = L"SW_genreSearchLabel";
			this->SW_genreSearchLabel->Size = System::Drawing::Size(54, 20);
			this->SW_genreSearchLabel->TabIndex = 5;
			this->SW_genreSearchLabel->Text = L"Genre:";
			// 
			// SW_genreTextBox
			// 
			this->SW_genreTextBox->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SW_genreTextBox->Location = System::Drawing::Point(190, 82);
			this->SW_genreTextBox->Name = L"SW_genreTextBox";
			this->SW_genreTextBox->Size = System::Drawing::Size(400, 28);
			this->SW_genreTextBox->TabIndex = 6;
			// 
			// SW_nameSearchLabel
			// 
			this->SW_nameSearchLabel->AutoSize = true;
			this->SW_nameSearchLabel->BackColor = System::Drawing::Color::Transparent;
			this->SW_nameSearchLabel->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SW_nameSearchLabel->Location = System::Drawing::Point(26, 130);
			this->SW_nameSearchLabel->Name = L"SW_nameSearchLabel";
			this->SW_nameSearchLabel->Size = System::Drawing::Size(156, 20);
			this->SW_nameSearchLabel->TabIndex = 7;
			this->SW_nameSearchLabel->Text = L"Actor/Actress name:";
			// 
			// SW_nameTextBox
			// 
			this->SW_nameTextBox->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SW_nameTextBox->Location = System::Drawing::Point(190, 127);
			this->SW_nameTextBox->Name = L"SW_nameTextBox";
			this->SW_nameTextBox->Size = System::Drawing::Size(400, 28);
			this->SW_nameTextBox->TabIndex = 8;
			// 
			// SW_dateSearchLabel
			// 
			this->SW_dateSearchLabel->AutoSize = true;
			this->SW_dateSearchLabel->BackColor = System::Drawing::Color::Transparent;
			this->SW_dateSearchLabel->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SW_dateSearchLabel->Location = System::Drawing::Point(81, 175);
			this->SW_dateSearchLabel->Name = L"SW_dateSearchLabel";
			this->SW_dateSearchLabel->Size = System::Drawing::Size(101, 20);
			this->SW_dateSearchLabel->TabIndex = 9;
			this->SW_dateSearchLabel->Text = L"Release date:";
			// 
			// SW_date1Label
			// 
			this->SW_date1Label->AutoSize = true;
			this->SW_date1Label->BackColor = System::Drawing::Color::Transparent;
			this->SW_date1Label->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SW_date1Label->Location = System::Drawing::Point(201, 175);
			this->SW_date1Label->Name = L"SW_date1Label";
			this->SW_date1Label->Size = System::Drawing::Size(68, 20);
			this->SW_date1Label->TabIndex = 10;
			this->SW_date1Label->Text = L"between";
			// 
			// SW_date1dayTextBox
			// 
			this->SW_date1dayTextBox->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SW_date1dayTextBox->Location = System::Drawing::Point(275, 172);
			this->SW_date1dayTextBox->Name = L"SW_date1dayTextBox";
			this->SW_date1dayTextBox->Size = System::Drawing::Size(30, 28);
			this->SW_date1dayTextBox->TabIndex = 11;
			this->SW_date1dayTextBox->Tag = L"";
			// 
			// SW_date1monthTextBox
			// 
			this->SW_date1monthTextBox->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SW_date1monthTextBox->Location = System::Drawing::Point(310, 172);
			this->SW_date1monthTextBox->Name = L"SW_date1monthTextBox";
			this->SW_date1monthTextBox->Size = System::Drawing::Size(30, 28);
			this->SW_date1monthTextBox->TabIndex = 12;
			// 
			// SW_date1yearTextBox
			// 
			this->SW_date1yearTextBox->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SW_date1yearTextBox->Location = System::Drawing::Point(345, 172);
			this->SW_date1yearTextBox->Name = L"SW_date1yearTextBox";
			this->SW_date1yearTextBox->Size = System::Drawing::Size(60, 28);
			this->SW_date1yearTextBox->TabIndex = 13;
			// 
			// SW_date2Label
			// 
			this->SW_date2Label->AutoSize = true;
			this->SW_date2Label->BackColor = System::Drawing::Color::Transparent;
			this->SW_date2Label->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SW_date2Label->Location = System::Drawing::Point(420, 175);
			this->SW_date2Label->Name = L"SW_date2Label";
			this->SW_date2Label->Size = System::Drawing::Size(34, 20);
			this->SW_date2Label->TabIndex = 14;
			this->SW_date2Label->Text = L"and";
			// 
			// SW_date2dayTextBox
			// 
			this->SW_date2dayTextBox->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SW_date2dayTextBox->Location = System::Drawing::Point(460, 172);
			this->SW_date2dayTextBox->Name = L"SW_date2dayTextBox";
			this->SW_date2dayTextBox->Size = System::Drawing::Size(30, 28);
			this->SW_date2dayTextBox->TabIndex = 15;
			// 
			// SW_date2monthTextBox
			// 
			this->SW_date2monthTextBox->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SW_date2monthTextBox->Location = System::Drawing::Point(495, 172);
			this->SW_date2monthTextBox->Name = L"SW_date2monthTextBox";
			this->SW_date2monthTextBox->Size = System::Drawing::Size(30, 28);
			this->SW_date2monthTextBox->TabIndex = 16;
			// 
			// SW_date2yearTextBox
			// 
			this->SW_date2yearTextBox->Font = (gcnew System::Drawing::Font(L"Comic Sans MS", 11.25F, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point, 
				static_cast<System::Byte>(0)));
			this->SW_date2yearTextBox->Location = System::Drawing::Point(530, 172);
			this->SW_date2yearTextBox->Name = L"SW_date2yearTextBox";
			this->SW_date2yearTextBox->Size = System::Drawing::Size(60, 28);
			this->SW_date2yearTextBox->TabIndex = 17;
			// 
			// SW_searchPanel
			// 
			this->SW_searchPanel->AutoScroll = true;
			this->SW_searchPanel->BackColor = System::Drawing::Color::Gainsboro;
			this->SW_searchPanel->BackgroundImage = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"SW_searchPanel.BackgroundImage")));
			this->SW_searchPanel->Controls->Add(this->SW_resultsLabel);
			this->SW_searchPanel->Location = System::Drawing::Point(17, 13);
			this->SW_searchPanel->Name = L"SW_searchPanel";
			this->SW_searchPanel->Size = System::Drawing::Size(600, 225);
			this->SW_searchPanel->TabIndex = 18;
			this->SW_searchPanel->Visible = false;
			// 
			// SW_resultsLabel
			// 
			this->SW_resultsLabel->AutoSize = true;
			this->SW_resultsLabel->Location = System::Drawing::Point(5, 5);
			this->SW_resultsLabel->Name = L"SW_resultsLabel";
			this->SW_resultsLabel->Size = System::Drawing::Size(0, 13);
			this->SW_resultsLabel->TabIndex = 1;
			// 
			// Search_Window
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->BackgroundImage = (cli::safe_cast<System::Drawing::Image^  >(resources->GetObject(L"$this.BackgroundImage")));
			this->ClientSize = System::Drawing::Size(634, 336);
			this->ControlBox = false;
			this->Controls->Add(this->SW_searchPanel);
			this->Controls->Add(this->SW_date2yearTextBox);
			this->Controls->Add(this->SW_date2monthTextBox);
			this->Controls->Add(this->SW_date2dayTextBox);
			this->Controls->Add(this->SW_date2Label);
			this->Controls->Add(this->SW_date1yearTextBox);
			this->Controls->Add(this->SW_date1monthTextBox);
			this->Controls->Add(this->SW_date1dayTextBox);
			this->Controls->Add(this->SW_date1Label);
			this->Controls->Add(this->SW_dateSearchLabel);
			this->Controls->Add(this->SW_nameTextBox);
			this->Controls->Add(this->SW_nameSearchLabel);
			this->Controls->Add(this->SW_genreTextBox);
			this->Controls->Add(this->SW_genreSearchLabel);
			this->Controls->Add(this->SW_titleTextBox);
			this->Controls->Add(this->SW_titleSearchLabel);
			this->Controls->Add(this->SW_backButton);
			this->Controls->Add(this->SW_okButton);
			this->Controls->Add(this->SW_errorLabel);
			this->MaximumSize = System::Drawing::Size(650, 375);
			this->MinimumSize = System::Drawing::Size(650, 375);
			this->Name = L"Search_Window";
			this->SizeGripStyle = System::Windows::Forms::SizeGripStyle::Hide;
			this->StartPosition = System::Windows::Forms::FormStartPosition::CenterParent;
			this->Text = L"CinePerfil - Search";
			this->SW_searchPanel->ResumeLayout(false);
			this->SW_searchPanel->PerformLayout();
			this->ResumeLayout(false);
			this->PerformLayout();

		}
#pragma endregion
	private:
		System::Void SW_okButton_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void SW_backButton_Click(System::Object^  sender, System::EventArgs^  e);
		System::Void trailer_Click(System::Object^  sender, System::Windows::Forms::LinkLabelLinkClickedEventArgs^  e);
		System::Void Search_Window::clear_textboxes();
};
}
